Closed Bug 455594 Opened 16 years ago Closed 8 months ago

Datepicker doesn't respect locale.

Categories

(MailNews Core :: XUL Replacements, defect)

PowerPC
macOS
defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: shy, Unassigned)

Details

Attachments

(2 files)

763 bytes, application/vnd.mozilla.xul+xml
Details
9.28 KB, image/png
Details
User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_5; en-us) AppleWebKit/528.4+ (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9) Gecko/2008061004 Firefox/3.0

Datepicker uses a different date format from the one that nsIScriptableDateFormat determines.
It may be using the default formatting for the environment's language setting.
Anyway it can differ from the format that, for example, nc:parseType="Date" triggers in a tree.

Reproducible: Always
Component: OS Integration → XUL Widgets
Product: Firefox → Toolkit
QA Contact: os.integration → xul.widgets
Version: unspecified → 1.9.0 Branch
The datepicker uses the JavaScript date formatting api which uses the C strftime function. nsIScriptableDateFormat is used for formatting dates for display which the datepicker doesn't need to do.

Anyway, you haven't described what you think is wrong here, so closing as incomplete. If you think there is a bug here, reopen and describe what the actual bug is.
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → INCOMPLETE
What I think is wrong is that the text representation of the date in a datepicker does not necessarily conform with the locale's format.
On my system, for example, the date September 22, 2008 is represented by the string "09/22/2008" in a datepicker, while a tree, if fed an rfc2822 date string marked as nc:parseType="Date", represents it as "22.09.2008". As does a textbox when set to a date value formatted with nsIScriptableDateFormat.

I will create attachments containing a testcase using nsIScriptableDateFormat and a screenshot of its appearance on my machine.
Status: RESOLVED → UNCONFIRMED
Resolution: INCOMPLETE → ---
Attached file testcase
This testcase is meant to compare the textual date formatting used be the datepicker widget to that obtained from nsIScriptableDateFormat.
Attached image screenshot
This is how the testcase displays on my system.
I can confirm this with Fx 3.5.1 on Mac OS X 10.5.7 (Intel) using german locale.
Component: XUL Widgets → XUL Replacements
Product: Toolkit → MailNews Core
Version: 1.9.0 Branch → Trunk
Severity: normal → S3

This bug is almost certainly completely obsolete at this point.

Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago8 months ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: